package com.mondo.financialwallet.domain.interactor;

import com.mondo.financialwallet.data.repository.WalletDataRepository;
import com.mondo.financialwallet.domain.executor.PostExecutionThread;
import com.mondo.financialwallet.domain.model.Response;
import com.mondo.financialwallet.domain.repository.WalletRepository;

import io.reactivex.Observable;

/**
 * 发起转账
 */
public class PostTokenTransfer extends UseCase<Response, PostTokenTransfer.Params> {

    private WalletRepository walletRepository;

    public PostTokenTransfer(PostExecutionThread postExecutionThread) {
        super(postExecutionThread);
        walletRepository = new WalletDataRepository();
    }

    @Override
    Observable<Response> buildUseCaseObservable(Params params) {
        walletRepository.transfer(params);
        return null;
    }

    public static class Params {
        // 货币Id
        public String tokenId;

        // 转账数量
        public String amount;

        // 到账地址
        public String address;

        // 备注
        public String remark;
    }
}
